import Vue from 'vue';
import { Component, Prop } from 'vue-property-decorator';
import { formatBigNumber } from '@/modules/utils/common-utils';

@Component
export default class CommentItem extends Vue {
  /* 评论数据 */
  @Prop({ default: {} })
  private data: any;

  @Prop({ default: false })
  private hasOperator: boolean = true;

  formatBigNum(number) {
    return formatBigNumber(number);
  }

  onCommentGoodClick() {
    this.$emit('commentGoodClick');
  }

  deleteComment() {
    this.$emit('deleteComment');
  }

  onReply() {
    this.$emit('onReply');
  }
}
